package com.summerli.common.util;

import com.summerli.common.constant.IdentityConstant;
import com.summerli.common.constant.RedisKeyPrefixConstant;

/**
 * 根据身份，返回不同的redis的前缀key
 */
public class RedisKeyUtil {
    public static String generateKeyPreByIdentity(int identify){
        String redisPreKey = "";
        if(identify == IdentityConstant.PASSENGER){
            redisPreKey = RedisKeyPrefixConstant.PASSENGER_LOGIN_KEY_PRE;
        }else if(identify == IdentityConstant.DRIVER){
            redisPreKey = RedisKeyPrefixConstant.DRIVER_LOGIN_KEY_PRE;
        }
        return redisPreKey;
    }
}
